﻿@page "/Projects"

<div style="text-align: center;">
    <Image Preview="false" Style="width: 40%;" Src="/Centre/AppleLogo.jpg"/>
    <Flex Align="center" Justify="center">
        <div class="gradient-text">iOS Club 社团项目</div>
    </Flex>
    <Paragraph Style="font-size: 22px" Strong Type="secondary">创造世界的新方式</Paragraph>
</div>

<Flex Justify="center" Align="center">
    <GridRow Class="block" Gutter="(20, 24)">
        @foreach (var item in Cards)
        {
            <GridCol Xs="24" Sm="24" Md="12" Lg="12" Xl="8" Xxl="8">
                <a href="@item.Url" target="_blank">
                    <Card Hoverable Class="card" Bordered="false">
                        <h1 style="margin-top: 10px;margin-bottom: 10px;">@item.Title</h1>
                        <Paragraph Type="secondary">@item.Content</Paragraph>
                    </Card>
                </a>
            </GridCol>
        }
    </GridRow>
</Flex>

@code

{
    private record ProjectCardModel(string Title, string Content, string Url = "");

    private static ProjectCardModel[] Cards =>
    [
        new("Old8Lang", "西建大iOS Club出品的脚本语言解释器 使用C#开发",
            "https://gitee.com/XAUATiOSClub/Old8Lang"),
        new("西建大iOS Club官网", "西建大iOS Club官网，使用Blazor开发",
            "https://gitee.com/XAUATiOSClub/iOSClub.Web"),
        new("代码综合平台", "将在线编辑器，编译器，OJ系统结合起来的代码综合平台，使用FastApi+Vue开发",
            "https://gitee.com/XAUATiOSClub/LetCoding"),
        new("文档生成平台", "将各式各样的文档进行生成，使用WPF+Asp.net Webapi开发",
            "https://gitee.com/XAUATiOSClub/DocumentMaking"),
        new("滑稽账本", "用.NET MAUI开发的账本App",
            "https://gitee.com/XAUATiOSClub/huaji-ledger"),
        new("LuckyFish.Json", "用C#开发的json解析器",
            "https://gitee.com/XAUATiOSClub/LuckyFish.Json")
    ];
}

<style>
    .block {
        width: 95%;
        margin-top: 45px;
        margin-bottom: 45px;
    }

    .card {
        margin: 10px;
        height: 200px;
        max-width: 100%;
        border-radius: 10px;
        background: #f3f5f7;
    }
</style>